<%@ page import="com.bafa.objects.*" %>
<% Match match = (Match)request.getAttribute("MATCH");   %>
<% User user = (User)session.getAttribute("LOGGEDON"); %>
<% Team team = (Team)session.getAttribute("LOGGEDONTEAM"); %>

<script language="JavaScript" type="text/javascript" src="richtext_compressed.js"></script>


<form name="myform" action="addmatchreport.bafa" method="post" onsubmit="return submitForm();">
<script language="JavaScript" type="text/javascript">
<!--
function submitForm() {
//make sure hidden and iframe values are in sync before submitting form
updateRTE('report'); //use this when syncing only 1 rich text editor ("rtel" is name of editor)
//updateRTEs(); //uncomment and call this line instead if there are multiple rich text editors inside the form
alert("Submitted value: "+document.myform.report.value) //alert submitted value
return true; //Set to false to disable form submission, for easy debugging.
}

//Usage: initRTE(imagesPath, includesPath, cssFile)
initRTE("images/", "", "");
//-->
</script>

<input type="text" name="author">
<input type="text" name="title">
<input type="hidden" name="matchId" value="<%=match.getID()%>"/>
<input type="hidden" name="teamId" value="<%=team.getID()%>"/>
<input type="hidden" name="seasonId" value="<%=match.getSeasonId()%>"/>
<script language="JavaScript" type="text/javascript">
<!--
//Usage: writeRichText(fieldname, html, width, height, buttons, readOnly)
writeRichText('report', 'here&#39;s the "<em>preloaded</em> <b>content</b>"', 400, 200, true, false);
//-->
</script>

<input type="submit">

</form>

